package teste;

import java.io.*;
import java.util.Iterator;
import java.util.Vector;

public class Teste {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		  Vector redesBassianas = new Vector();
		    
			File dir = new File("C:\\teste\\");

			FilenameFilter filter = new FilenameFilter() {
				public boolean accept(File dir, String name) {
					return name.endsWith(".xdsl");
				}
			};

			String[] children = dir.list(filter);
			for (int i = 0; i < children.length; i++) {
				// Get filename of file or directory
				redesBassianas.add(children[i]);
		
			}
			for (Iterator iterator = redesBassianas.iterator(); iterator.hasNext();) {
				String arquivo = (String) iterator.next();
				System.out.println(arquivo);
			}
			
	
	}
}